package cn.geminis.crypto.cert.service.config;

import cn.geminis.web.security.JwtWebSecurityConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;

/**
 * @author puddi
 */
@Configuration
@Slf4j
public class SecurityConfiguration extends JwtWebSecurityConfig {

    @Override
    protected void configure(HttpSecurity httpSecurity) throws Exception {
        httpSecurity
                .authorizeRequests()
                .anyRequest().permitAll();
//                .antMatchers("/swagger-ui.html").permitAll()
//                .antMatchers("/swagger-resources/**").permitAll()
//                .antMatchers("/images/**").permitAll()
//                .antMatchers("/webjars/**").permitAll()
//                .antMatchers("/v2/api-docs").permitAll();

        super.configure(httpSecurity);

        log.info("SVS Spring Security configured");
    }
}
